var util = require('../../utils/util.js')

//index.js
//获取应用实例
var app = getApp()
Page({
  data: {
    money : 0.00,
    userInfo: {},
    redpacket_count:'0'
  },
  onShow: function () {
    this.setData({
       money: wx.getStorageSync('money'),
       redpacket_count: wx.getStorageSync('moneyredpacket_info').not_used_count
    })
  },

  //去充值页面
  goRechargePage:function(){
    var url = util.isBindMobile() ? '/pages/recharge/recharge' :'/pages/login/login';
    wx.navigateTo({ url:url});
  },
  //去我的红包页面
  goRedpacketPage:function(){
    var url = util.isBindMobile() ? '/pages/redpacket/redpacket' : '/pages/login/login';
    wx.navigateTo({ url: url });
  },
  //去我的使用记录页面
  goUsagelogPage:function(){
    var url = util.isBindMobile() ? '/pages/usagelog/usagelog' : '/pages/login/login';
    wx.navigateTo({ url: url });
  }

})
